<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>添加商品</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/AdminLTE-2.3.11/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="/AdminLTE-2.3.11/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="/AdminLTE-2.3.11/dist/css/skins/_all-skins.min.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <div th:insert="/fragments/header :: header"></div>

    <div th:insert="/fragments/sidebar :: sidebar"></div>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-8">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <div th:switch="${typeid}">
                                <div th:case="1">
                                    <h3 class="box-title">添加服装类商品</h3>
                                </div>
                                <div th:case="2">
                                    <h3 class="box-title">添加食品类商品</h3>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form role="form" th:action="@{/admin/goods/add/} + ${typeid}" method="post">
                            <div class="box-body">
                                <div class="form-group">
                                    <label>名称</label>
                                    <input type="text" name="gname" class="form-control">
                                </div>
                                <div class="form-group">
                                    <label>品牌</label>
                                    <input type="text" name="brand" class="form-control">
                                </div>
                                <div th:switch="${typeid}">
                                    <div th:case="1">
                                        <div class="form-group">
                                            <label>颜色</label>
                                            <input type="text" name="color" class="form-control">
                                        </div>
                                        <div class="form-group">
                                            <label>大小</label>
                                            <input type="text" name="size" class="form-control">
                                        </div>
                                        <div class="form-group">
                                            <label>适合人群</label>
                                            <input type="text" name="crowd" class="form-control">
                                        </div>
                                    </div>
                                    <div th:case="2">
                                        <div class="form-group">
                                            <label>保质期截止日期</label>
                                            <input type="date" name="deadline" class="form-control">
                                        </div>
                                        <div class="form-group">
                                            <label>产地</label>
                                            <input type="text" name="provenance" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label>价格</label>
                                    <input type="text" name="price" class="form-control">
                                </div>
                                <div class="form-group">
                                    <label>数量</label>
                                    <input type="text" name="count" class="form-control">
                                </div>
                            </div>
                            <!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">确认添加</button>
                            </div>
                        </form>
                    </div>
                    <!-- /.box -->
                </div>
            </div>
            <!-- /.row -->
        </section>
        <!-- /.content -->
    </div>

    <div th:insert="/fragments/footer :: footer"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 2.2.3 -->
<script src="/AdminLTE-2.3.11/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/AdminLTE-2.3.11/bootstrap/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="/AdminLTE-2.3.11/plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="/AdminLTE-2.3.11/dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="/AdminLTE-2.3.11/dist/js/demo.js"></script>
</body>
</html>
